﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using SharedCode;
using AdminModule.IndexMarkServiceReference;

namespace AdminModule.ViewModels
{
    public class EditWindowVM : ViewModelBase, INotifyPropertyChanged
    {
        public IndexMarkServiceClient client = new IndexMarkServiceClient();

        private object _objectForEdit;
        public object objectForEdit
        {
            get
            {
                return this._objectForEdit;
            }
            set
            {
                this._objectForEdit = value;
                NotifyPropertyChanged("objectForEdit");
            }
        }

        private ViewModelBase _foreignViewModel;
        public ViewModelBase foreignViewModel
        {
            get
            {
                return this._foreignViewModel;
            }
            set
            {
                this._foreignViewModel = value;
                NotifyPropertyChanged("foreignViewModel");
            }
        }

        // Declare the PropertyChanged event
        public event PropertyChangedEventHandler PropertyChanged;

        // NotifyPropertyChanged will raise the PropertyChanged event passing the
        // source property that is being updated.
        public void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
